package com.youyu.core.jms.kafka.model;

import com.alibaba.fastjson.JSONObject;

import java.util.List;

/**
 * <p>Author:  dxj</p>
 * <p>Date:2017/8/25 15:22</p>
 * <p>Description:消费数据对象</p>
 * <p>Copyright: Copyright (c) 2017</p>
 * <p>Company: youyu</p>
 */
public class ConsumerData {
	
	private long offset;
	
	private List<JSONObject> datas;

	public long getOffset() {
		return offset;
	}

	public void setOffset(long offset) {
		this.offset = offset;
	}

	public List<JSONObject> getDatas() {
		return datas;
	}

	public void setDatas(List<JSONObject> datas) {
		this.datas = datas;
	}
	
	public String toString(){
		StringBuilder builder = new StringBuilder();
		builder.append("当前offset:" + this.offset);
		builder.append("\n");
		for(int i = 0, len = this.datas.size(); i < len; i++){
			builder.append(this.datas.get(i));
			builder.append("\n");
		}
		
		return builder.toString();
	}
}
